home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / AppleScanGS / Globals.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-03  |  1.5 KB  |  46 lines  |  [TEXT/MPS ]

  1. /***********************************************************************
  2. *
  3. * Globals.c
  4. *
  5. * Copyright (c)
  6. * Apple Computer, Inc.  1986-1989
  7. * All Rights Reserved.
  8. *
  9. * This file contains the code which intializes the global variables 
  10. * used by the scanner program.
  11. *
  12. ***********************************************************************/
  13.  
  14. #include "Scan.h"
  15.  
  16. #include <qdaux.h>
  17. #include <quickdraw.h>
  18. #include <window.h>
  19.  
  20. unsigned int    quitFlag = 0;       /* True when quitting */
  21. unsigned int    staggerCount = 0;   /* Used to stagger windows as they open */
  22. WmTaskRec       event;              /* All events are returned here */
  23. scannerWindowDef    sWindowDef;
  24. GrafPortPtr previewWindowPtr = NULL;
  25. GrafPortPtr settingsWindowPtr = NULL;
  26. PicHndl    previewRuler = NULL;
  27. int            scanDevnum;                /* device number of Scanner */
  28.  
  29. word    Scanner_Type;
  30. long    (*Setup[2])() = {Setup_Apple,Setup_CPCScan};
  31.  
  32. void    initGlobals()
  33. {
  34.     quitFlag = staggerCount = 0;
  35.  
  36.     sWindowDef.reserved0 = sWindowDef.reserved0 = sWindowDef.reserved1 = sWindowDef.reserved2 = 0;
  37.     sWindowDef.reserved3 = sWindowDef.reserved4 = sWindowDef.reserved5 = 0;
  38.     sWindowDef.windDescBlockLenMSB = sWindowDef.windDescBlockLenLSB = 0;
  39.     sWindowDef.windowIdentifier = sWindowDef.reserved6 = sWindowDef.xResolution = 0;
  40.     sWindowDef.yResolution = sWindowDef.xUpperLeft = sWindowDef.yUpperLeft = 0;
  41.     sWindowDef.width = sWindowDef.length = sWindowDef.brightness = 0;
  42.     sWindowDef.threshold = sWindowDef.contrast = sWindowDef.imageComposition = 0;
  43.     sWindowDef.bitsPerPixel = sWindowDef.halfTone = sWindowDef.paddingType = 0;
  44.     
  45.  
  46. }